:root {
  --primary-color: #6a11cb;
  --secondary-color: #2575fc;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --text-color: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color);
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media screen and (max-width: 600px) {
  .container {
    padding: 10px;
  }

  .login-box, .chat-box {
    padding: 20px;
    border-radius: 10px;
  }

  .login-box h1 {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .login-box input, .login-box button, #messageInput, #sendBtn {
    padding: 10px;
    font-size: 0.9rem;
  }

  .messages {
    padding: 8px;
  }

  .message {
    padding: 8px;
    font-size: 0.9rem;
  }

  .message-time {
    font-size: 0.7rem;
  }

  .input-area {
    padding: 8px;
  }
}

.login-box, .chat-box {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  animation: fadeIn 0.5s ease;
}

.login-box {
  text-align: center;
}

.login-box h1 {
  margin-bottom: 20px;
  font-size: 2rem;
}

.login-box input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  font-size: 1rem;
}

.login-box button, #sendBtn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.login-box button:hover, #sendBtn:hover {
  background: var(--primary-color);
  transform: translateY(-2px);
}

.chat-box {
  display: none;
  height: 80vh;
  flex-direction: column;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  margin-bottom: 15px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.message {
  margin: 8px 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  animation: slideIn 0.3s ease;
}

.message-content {
  margin-bottom: 4px;
}

.message-time {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: right;
}

.input-area {
  display: flex;
  gap: 10px;
  padding: 10px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
}

#messageInput {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-color);
  font-size: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
